package com.rbcs.base.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.systop.common.modules.security.user.model.User;
import com.systop.core.model.BaseModel;

/**
 * 外币币种汇率管理
 * @author ShangHua
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "exchange_rates")
public class ExchangeRate extends BaseModel {

	// 主键ID
	private Integer id;

	// 年度
	private String year;

	// 1月份汇率
	private float januaryRate;

	// 2月份汇率
	private float februaryRate;

	// 3月份汇率
	private float marchRate;

	// 4月份汇率
	private float aprilRate;

	// 5月份汇率
	private float mayRate;

	// 6月份汇率
	private float juneRate;

	// 7月份汇率
	private float julyRate;

	// 8月份汇率
	private float augustRate;

	// 9月份汇率
	private float septemberRate;

	// 10月份汇率
	private float octoberRate;

	// 11月份汇率
	private float novemberRate;

	// 12月份汇率
	private float decemberRate;

	// 币种
	private Currency currency;
	
	// 创建人
	private User creator;
	
	// 创建时间
	private Date createTime;

	public ExchangeRate() {
	}

	@Id
	@GeneratedValue(generator = "hibseq")
	@GenericGenerator(name = "hibseq", strategy = "hilo")
	@Column(name = "Id", nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "year", length = 10)
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	@Column(name = "january_rate")
	public float getJanuaryRate() {
		return januaryRate;
	}

	public void setJanuaryRate(float januaryRate) {
		this.januaryRate = januaryRate;
	}

	@Column(name = "february_rate")
	public float getFebruaryRate() {
		return februaryRate;
	}

	public void setFebruaryRate(float februaryRate) {
		this.februaryRate = februaryRate;
	}

	@Column(name = "march_rate")
	public float getMarchRate() {
		return marchRate;
	}

	public void setMarchRate(float marchRate) {
		this.marchRate = marchRate;
	}

	@Column(name = "april_rate")
	public float getAprilRate() {
		return aprilRate;
	}

	public void setAprilRate(float aprilRate) {
		this.aprilRate = aprilRate;
	}

	@Column(name = "may_rate")
	public float getMayRate() {
		return mayRate;
	}

	public void setMayRate(float mayRate) {
		this.mayRate = mayRate;
	}

	@Column(name = "june_rate")
	public float getJuneRate() {
		return juneRate;
	}

	public void setJuneRate(float juneRate) {
		this.juneRate = juneRate;
	}

	@Column(name = "july_rate")
	public float getJulyRate() {
		return julyRate;
	}

	public void setJulyRate(float julyRate) {
		this.julyRate = julyRate;
	}

	@Column(name = "august_rate")
	public float getAugustRate() {
		return augustRate;
	}

	public void setAugustRate(float augustRate) {
		this.augustRate = augustRate;
	}

	@Column(name = "september_rate")
	public float getSeptemberRate() {
		return septemberRate;
	}

	public void setSeptemberRate(float septemberRate) {
		this.septemberRate = septemberRate;
	}

	@Column(name = "october_rate")
	public float getOctoberRate() {
		return octoberRate;
	}

	public void setOctoberRate(float octoberRate) {
		this.octoberRate = octoberRate;
	}

	@Column(name = "november_rate")
	public float getNovemberRate() {
		return novemberRate;
	}

	public void setNovemberRate(float novemberRate) {
		this.novemberRate = novemberRate;
	}

	@Column(name = "december_rate")
	public float getDecemberRate() {
		return decemberRate;
	}

	public void setDecemberRate(float decemberRate) {
		this.decemberRate = decemberRate;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "currency_id")
	public Currency getCurrency() {
		return currency;
	}

	public void setCurrency(Currency currency) {
		this.currency = currency;
	}
	
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "creator_id")
	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}
	
	@JoinColumn(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
